<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ page import="com.reapal.config.*"%>
<%@ page import="com.reapal.utils.*"%>
<%@ page import="java.text.SimpleDateFormat"%>
<%@ page import="java.math.BigDecimal"%>
<%@ page import="com.alibaba.fastjson.*"%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
  </head>
  <%
      //卡号
  	  String card_no = request.getParameter("card_no").trim();
	  //姓名
      String owner = new String(request.getParameter("owner").trim().getBytes("ISO-8859-1"),"utf-8");
	  //会员id
	  String member_id = request.getParameter("member_id").trim();
	  //证件号
	  String cert_no = request.getParameter("cert_no").trim();
	  //手机
	  String phone = request.getParameter("phone").trim();
	  //安全码
	  String cvv2 = request.getParameter("cvv2").trim();
	  //有效期
	  String validthru = request.getParameter("validthru").trim();
	  
  	
    Map<String, String> map = new HashMap<String, String>();
	map.put("merchant_id", ReapalConfig.merchant_id);                                         //商户ID
	map.put("card_no", card_no);                                                              //卡号
	map.put("owner", owner);                                                                  //姓名
	map.put("cert_type", "01");                                                               //证件类型
	map.put("cert_no", cert_no);                                                              //证件号
	map.put("phone", phone);                                                                  //银行预留手机号
	map.put("cvv2", cvv2);                                                                    //信用卡背后的三位数字
	map.put("validthru", validthru);                                                          //卡有效期
	map.put("member_id", member_id);           
	map.put("identify_id", ReapalUtil.getUUID());                                                //指纹ID
	map.put("version", ReapalConfig.version);                                                 //版本号信息
	
	
	String url = "/fast/identify";

	String post = ReapalSubmit.buildSubmit(map, url);

    System.out.println("返回结果post==========>" + post);
    
    //解密返回的数据
    String res = Decipher.decryptData(post);
  %>
  <body>
		
		<%=res%>
  </body>
</html>
